<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:QKit"
                    xmlns:common="using:QKit.Common">
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
            <JumpListItemBackgroundConverter x:Key="JumpListItemBackgroundConverter"
                                             Enabled="{ThemeResource PhoneAccentBrush}"
                                             Disabled="{ThemeResource PhoneChromeBrush}" />
            <JumpListItemForegroundConverter x:Key="JumpListItemForegroundConverter"
                                             Enabled="{ThemeResource PhoneForegroundBrush}"
                                             Disabled="{ThemeResource PhoneForegroundBrush}" />
            <Thickness x:Key="JumpListItemBorderThickness">0</Thickness>
            <Thickness x:Key="JumpListItemTextMargin">9.5,0,0,9.5</Thickness>
            <Thickness x:Key="AlphaJumpListGroupTextMargin">5.5,0,0,9.5</Thickness>
            <SolidColorBrush x:Key="JumpListGroupHeaderTextForegroundBrush"
                             Color="White" />

            <!--Item templates for JumpList ZoomedOutView-->
            <DataTemplate x:Key="AlphaJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="79"
                        Width="79"
                        HorizontalAlignment="Left"
                        Margin="0,0,9.5,9.5">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="38.667"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               HorizontalAlignment="Left"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>
            <DataTemplate x:Key="GenericJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="49.5"
                        Margin="0,0,0,9.5"
                        HorizontalAlignment="Stretch">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="22"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>

            <!--AlphaGroupHeader Border Style-->
            <Style x:Key="AlphaGroupHeaderBorderStyle"
                   TargetType="Border">
                <Setter Property="Background"
                        Value="{ThemeResource PhoneAccentBrush}" />
                <Setter Property="BorderBrush"
                        Value="{ThemeResource PhoneAccentBrush}" />
                <Setter Property="BorderThickness"
                        Value="{ThemeResource JumpListItemBorderThickness}" />
            </Style>
        </ResourceDictionary>
        <ResourceDictionary x:Key="Light">
            <JumpListItemBackgroundConverter x:Key="JumpListItemBackgroundConverter"
                                             Enabled="{ThemeResource PhoneAccentBrush}"
                                             Disabled="{ThemeResource PhoneChromeBrush}" />
            <JumpListItemForegroundConverter x:Key="JumpListItemForegroundConverter"
                                             Enabled="{ThemeResource PhoneBackgroundBrush}"
                                             Disabled="{ThemeResource PhoneLowBrush}" />
            <Thickness x:Key="JumpListItemBorderThickness">0</Thickness>
            <Thickness x:Key="JumpListItemTextMargin">9.5,0,0,9.5</Thickness>
            <Thickness x:Key="AlphaJumpListGroupTextMargin">5.5,0,0,9.5</Thickness>
            <SolidColorBrush x:Key="JumpListGroupHeaderTextForegroundBrush"
                             Color="White" />

            <!--Item templates for JumpList ZoomedOutView-->
            <DataTemplate x:Key="AlphaJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="79"
                        Width="79"
                        HorizontalAlignment="Left"
                        Margin="0,0,9.5,9.5">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="38.667"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               HorizontalAlignment="Left"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>
            <DataTemplate x:Key="GenericJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="49.5"
                        Margin="0,0,0,9.5"
                        HorizontalAlignment="Stretch">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="22"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>

            <!--AlphaGroupHeader Border Style-->
            <Style x:Key="AlphaGroupHeaderBorderStyle"
                   TargetType="Border">
                <Setter Property="Background"
                        Value="{ThemeResource PhoneAccentBrush}" />
                <Setter Property="BorderBrush"
                        Value="{ThemeResource PhoneAccentBrush}" />
                <Setter Property="BorderThickness"
                        Value="{ThemeResource JumpListItemBorderThickness}" />
            </Style>
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
            <JumpListItemBackgroundConverter x:Key="JumpListItemBackgroundConverter"
                                             Enabled="{ThemeResource PhoneBackgroundBrush}"
                                             Disabled="{ThemeResource PhoneBackgroundBrush}" />
            <JumpListItemForegroundConverter x:Key="JumpListItemForegroundConverter"
                                             Enabled="{ThemeResource PhoneForegroundBrush}"
                                             Disabled="{ThemeResource PhoneDisabledBrush}" />
            <Thickness x:Key="JumpListItemBorderThickness">2.5</Thickness>
            <Thickness x:Key="JumpListItemTextMargin">7,0,0,7</Thickness>
            <Thickness x:Key="AlphaJumpListGroupTextMargin">5.5,0,0,7</Thickness>
            <SolidColorBrush x:Key="JumpListGroupHeaderTextForegroundBrush"
                             Color="{ThemeResource SystemColorControlAccentColor}" />

            <!--Item templates for JumpList ZoomedOutView-->
            <DataTemplate x:Key="AlphaJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="79"
                        Width="79"
                        HorizontalAlignment="Left"
                        Margin="0,0,9.5,9.5">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="38.667"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               HorizontalAlignment="Left"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>
            <DataTemplate x:Key="GenericJumpListPickerItemTemplate">
                <Border Background="{Binding Converter={StaticResource JumpListItemBackgroundConverter}}"
                        BorderBrush="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                        BorderThickness="{ThemeResource JumpListItemBorderThickness}"
                        Height="49.5"
                        Margin="0,0,0,9.5"
                        HorizontalAlignment="Stretch">
                    <TextBlock Text="{Binding Group.KeyDisplay}"
                               Foreground="{Binding Converter={StaticResource JumpListItemForegroundConverter}}"
                               FontSize="22"
                               FontWeight="SemiBold"
                               TextLineBounds="Tight"
                               OpticalMarginAlignment="TrimSideBearings"
                               IsColorFontEnabled="False"
                               IsTextScaleFactorEnabled="False"
                               VerticalAlignment="Bottom"
                               Margin="{ThemeResource JumpListItemTextMargin}" />
                </Border>
            </DataTemplate>

            <!--AlphaGroupHeader Border Style-->
            <Style x:Key="AlphaGroupHeaderBorderStyle"
                   TargetType="Border">
                <Setter Property="Background"
                        Value="Transparent" />
                <Setter Property="BorderBrush"
                        Value="{ThemeResource PhoneAccentBrush}" />
                <Setter Property="BorderThickness"
                        Value="{ThemeResource JumpListItemBorderThickness}" />
            </Style>
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <!--RESOURCE VALUES-->
    <Thickness x:Key="JumpListPadding">0,0,0,76</Thickness>
    <Thickness x:Key="JumpListHeaderItemMargin">19,0,0,9.5</Thickness>

    <!--DATA TEMPLATES-->
    <!--Sticky header templates-->
    <DataTemplate x:Key="AlphaGroupHeaderTemplate">
        <Border Style="{ThemeResource AlphaGroupHeaderBorderStyle}"
                Width="49.5"
                Height="49.5"
                HorizontalAlignment="Left"
                Margin="{ThemeResource JumpListHeaderItemMargin}">
            <TextBlock Text="{Binding KeyDisplay}"
                       Foreground="{ThemeResource JumpListGroupHeaderTextForegroundBrush}"
                       FontSize="39"
                       FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                       TextLineBounds="Tight"
                       OpticalMarginAlignment="TrimSideBearings"
                       IsColorFontEnabled="False"
                       IsTextScaleFactorEnabled="False"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Bottom"
                       Margin="{ThemeResource AlphaJumpListGroupTextMargin}" />
        </Border>
    </DataTemplate>
    <DataTemplate x:Key="AlphaBorderGroupHeaderTemplate">
        <Border Background="Transparent"
                BorderBrush="{ThemeResource PhoneAccentBrush}"
                BorderThickness="2.5"
                Width="49.5"
                Height="49.5"
                HorizontalAlignment="Left"
                Margin="{ThemeResource JumpListHeaderItemMargin}">
            <TextBlock Text="{Binding KeyDisplay}"
                       Foreground="{StaticResource PhoneAccentBrush}"
                       FontSize="33"
                       FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                       TextLineBounds="Tight"
                       OpticalMarginAlignment="TrimSideBearings"
                       IsColorFontEnabled="False"
                       IsTextScaleFactorEnabled="False"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Bottom"
                       Margin="5.5,9,0,8.5" />
        </Border>
    </DataTemplate>
    <DataTemplate x:Key="GenericGroupHeaderTemplate">
        <Border>
            <TextBlock Text="{Binding KeyDisplay}"
                       Foreground="{ThemeResource PhoneAccentBrush}"
                       FontSize="24"
                       FontWeight="SemiLight"
                       OpticalMarginAlignment="TrimSideBearings"
                       IsTextScaleFactorEnabled="False"
                       VerticalAlignment="Bottom"
                       Margin="{ThemeResource JumpListHeaderItemMargin}" />
        </Border>
    </DataTemplate>

    <!--STYLES-->
    <!--Disappearing sticky header fix, apply to ZoomedInView group styles-->
    <Style x:Key="JumpListHeaderContainerStyle"
           TargetType="ListViewBaseHeaderItem">
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Stretch" />
    </Style>

    <!--Styles of ZoomedOutView GridView/ListView-->
    <Style x:Key="AlphaJumpListPickerStyle"
           TargetType="GridView">
        <Setter Property="Background"
                Value="{ThemeResource ContentDialogDimmingThemeBrush}" />
        <Setter Property="ItemTemplate"
                Value="{ThemeResource AlphaJumpListPickerItemTemplate}" />
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="GridViewItem">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="GridViewItem">
                                <Border x:Name="TiltContainer">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <PointerDownThemeAnimation Storyboard.TargetName="TiltContainer" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition From="Pressed"
                                                                  To="Normal">
                                                    <Storyboard>
                                                        <PointerUpThemeAnimation Storyboard.TargetName="TiltContainer" />
                                                    </Storyboard>
                                                </VisualTransition>
                                            </VisualStateGroup.Transitions>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <ContentPresenter ContentTransitions="{TemplateBinding ContentTransitions}"
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                                      Content="{TemplateBinding Content}"
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      Margin="{TemplateBinding Padding}" />
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GridView">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Viewbox HorizontalAlignment="Left"
                                 VerticalAlignment="Top">
                            <ScrollViewer x:Name="ScrollViewer"
                                          AutomationProperties.AccessibilityView="Raw"
                                          BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                          HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                          HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                          IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                          IsHorizontalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsHorizontalScrollChainingEnabled}"
                                          IsVerticalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsVerticalScrollChainingEnabled}"
                                          IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                          IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                          TabNavigation="{TemplateBinding TabNavigation}"
                                          VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                          VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                          ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
                                <ItemsPresenter FooterTransitions="{TemplateBinding FooterTransitions}"
                                                FooterTemplate="{TemplateBinding FooterTemplate}"
                                                Footer="{TemplateBinding Footer}"
                                                HeaderTemplate="{TemplateBinding HeaderTemplate}"
                                                Header="{TemplateBinding Header}"
                                                HeaderTransitions="{TemplateBinding HeaderTransitions}"
                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                Padding="{TemplateBinding Padding}"
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </ScrollViewer>
                        </Viewbox>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GenericJumpListPickerStyle"
           TargetType="ListView">
        <Setter Property="FontFamily"
                Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize"
                Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="Background"
                Value="{ThemeResource ContentDialogDimmingThemeBrush}" />
        <Setter Property="ItemTemplate"
                Value="{ThemeResource GenericJumpListPickerItemTemplate}" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="ListViewItem">
                    <Setter Property="HorizontalContentAlignment"
                            Value="Stretch" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListViewItem">
                                <Border x:Name="OuterContainer"
                                        RenderTransformOrigin="0.5,0.5">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <PointerDownThemeAnimation Storyboard.TargetName="TiltContainer" />
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="CheckboxPressed">
                                                <Storyboard>
                                                    <PointerDownThemeAnimation Storyboard.TargetName="CheckboxTiltContainer" />
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle"
                                                                                   Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="{ThemeResource CheckBoxPressedBackgroundThemeBrush}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph"
                                                                                   Storyboard.TargetProperty="Fill">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="{ThemeResource CheckBoxPressedForegroundThemeBrush}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                                                     Storyboard.TargetProperty="Opacity"
                                                                     Duration="0"
                                                                     To="{ThemeResource ListViewItemDisabledThemeOpacity}" />
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle"
                                                                                   Storyboard.TargetProperty="Stroke"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="{ThemeResource CheckBoxDisabledBorderThemeBrush}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph"
                                                                                   Storyboard.TargetProperty="Fill"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="{ThemeResource CheckBoxDisabledForegroundThemeBrush}" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder"
                                                                                   Storyboard.TargetProperty="BorderBrush"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="Transparent" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedEarmark"
                                                                                   Storyboard.TargetProperty="Fill"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="Transparent" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedGlyph"
                                                                                   Storyboard.TargetProperty="Fill"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="Transparent" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition From="Pressed"
                                                                  To="Normal">
                                                    <Storyboard>
                                                        <PointerUpThemeAnimation Storyboard.TargetName="TiltContainer" />
                                                    </Storyboard>
                                                </VisualTransition>
                                            </VisualStateGroup.Transitions>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="DataVirtualizationStates">
                                            <VisualState x:Name="DataAvailable" />
                                            <VisualState x:Name="DataPlaceholder">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock"
                                                                                   Storyboard.TargetProperty="Visibility"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderRect"
                                                                                   Storyboard.TargetProperty="Visibility"
                                                                                   Duration="0">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="Visible" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border.RenderTransform>
                                        <ScaleTransform x:Name="ContentScaleTransform" />
                                    </Border.RenderTransform>
                                    <Border x:Name="TiltContainer">
                                        <Border x:Name="ContentBorder"
                                                Background="{TemplateBinding Background}"
                                                BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}">
                                            <Border.RenderTransform>
                                                <TranslateTransform x:Name="ContentBorderTranslateTransform" />
                                            </Border.RenderTransform>
                                            <Grid>
                                                <ContentPresenter x:Name="contentPresenter"
                                                                  ContentTransitions="{TemplateBinding ContentTransitions}"
                                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                  Content="{TemplateBinding Content}"
                                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                                  Margin="{TemplateBinding Padding}" />
                                                <!-- The 'Xg' text simulates the amount of space one line of text will occupy.
                                            In the DataPlaceholder state, the Content is not loaded yet so we
                                            approximate the size of the item using placeholder text. -->
                                                <TextBlock x:Name="PlaceholderTextBlock"
                                                           Opacity="0"
                                                           Text="Xg"
                                                           Foreground="{x:Null}"
                                                           Margin="{TemplateBinding Padding}"
                                                           IsHitTestVisible="False"
                                                           AutomationProperties.AccessibilityView="Raw" />
                                                <Rectangle x:Name="PlaceholderRect"
                                                           Visibility="Collapsed"
                                                           Fill="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}"
                                                           IsHitTestVisible="False" />
                                            </Grid>
                                        </Border>
                                    </Border>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Padding"
                Value="19,15,19,66.5" />
    </Style>

    <!--AlphaJumpList-->
    <Style TargetType="local:AlphaJumpList">
        <Setter Property="JumpListGroupStyle">
            <Setter.Value>
                <GroupStyle HeaderTemplate="{StaticResource AlphaGroupHeaderTemplate}"
                            HeaderContainerStyle="{StaticResource JumpListHeaderContainerStyle}"
                            HidesIfEmpty="True" />
            </Setter.Value>
        </Setter>
        <Setter Property="Padding"
                Value="{StaticResource JumpListPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AlphaJumpList">
                    <SemanticZoom x:Name="part_SemanticZoom"
                                  ZoomedInView="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BaseList}"
                                  CanChangeViews="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CanChangeViews, Mode=TwoWay}"
                                  IsZoomedInViewActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsZoomedInViewActive, Mode=TwoWay}">
                        <SemanticZoom.ZoomedOutView>
                            <GridView x:Name="part_AlphaPicker"
                                      ItemsSource="{TemplateBinding CollectionGroups}"
                                      Style="{StaticResource AlphaJumpListPickerStyle}" />
                        </SemanticZoom.ZoomedOutView>
                    </SemanticZoom>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--GenericJumpList-->
    <Style TargetType="local:GenericJumpList">
        <Setter Property="JumpListGroupStyle">
            <Setter.Value>
                <GroupStyle HeaderTemplate="{StaticResource GenericGroupHeaderTemplate}"
                            HeaderContainerStyle="{StaticResource JumpListHeaderContainerStyle}"
                            HidesIfEmpty="True" />
            </Setter.Value>
        </Setter>
        <Setter Property="Padding"
                Value="{StaticResource JumpListPadding}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:GenericJumpList">
                    <SemanticZoom x:Name="part_SemanticZoom"
                                  ZoomedInView="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=BaseList}"
                                  CanChangeViews="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=CanChangeViews, Mode=TwoWay}"
                                  IsZoomedInViewActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsZoomedInViewActive, Mode=TwoWay}">
                        <SemanticZoom.ZoomedOutView>
                            <ListView ItemsSource="{TemplateBinding CollectionGroups}"
                                      Style="{StaticResource GenericJumpListPickerStyle}" />
                        </SemanticZoom.ZoomedOutView>
                    </SemanticZoom>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ListPlaceholder-->
    <DataTemplate x:Key="ListPlaceholderContentTemplate">
        <TextBlock Text="{Binding}"
                   Style="{ThemeResource ListViewEmptyStaticTextBlockStyle}" />
    </DataTemplate>
    <Style TargetType="local:ListPlaceholder">
        <Setter Property="LoadingPlaceholderContent"
                Value="Loading..." />
        <Setter Property="EmptyPlaceholderContent"
                Value="Nothing to show." />
        <Setter Property="LoadingPlaceholderTemplate"
                Value="{StaticResource ListPlaceholderContentTemplate}" />
        <Setter Property="EmptyPlaceholderTemplate"
                Value="{StaticResource ListPlaceholderContentTemplate}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ListPlaceholder">
                    <ContentPresenter Content="{TemplateBinding PlaceholderContent}"
                                      ContentTemplate="{TemplateBinding PlaceholderTemplate}"
                                      Visibility="{TemplateBinding PlaceholderVisibility}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--InputAwarePanel-->
    <Style TargetType="local:InputAwarePanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:InputAwarePanel">
                    <Grid x:Name="RootGrid">
                        <Grid.RenderTransform>
                            <CompositeTransform />
                        </Grid.RenderTransform>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border x:Name="part_ShiftCompensator"
                                Height="0" />
                        <ContentPresenter Content="{TemplateBinding Child}"
                                          Grid.Row="1" />
                        <Border x:Name="part_InputPaneSpacer"
                                Grid.Row="2"
                                Height="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--MultiSelectListView-->
    <x:Double x:Key="EdgeMultiSelectButtonWidth">45</x:Double>
    <Thickness x:Key="EdgeMultiSelectButtonMargin">0,0,-26,0</Thickness>
    <x:Double x:Key="EdgeMultiSelectButtonVisualWidth">15</x:Double>
    <Thickness x:Key="ListViewItemCheckBoxPadding">19,0,0,0</Thickness>
    <Style TargetType="common:EdgeSelectButton">
        <Setter Property="Background"
                Value="{ThemeResource PhoneAccentBrush}" />
        <Setter Property="Width"
                Value="{ThemeResource EdgeMultiSelectButtonWidth}" />
        <Setter Property="Margin"
                Value="{ThemeResource EdgeMultiSelectButtonMargin}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="common:EdgeSelectButton">
                    <Grid Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Pressed"
                                                      To="PointerOver">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="VisualFeedbackIndicator"
                                                             Storyboard.TargetProperty="Opacity"
                                                             Duration="0:0:0.5"
                                                             To="0" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="PointerOver"
                                                      To="Normal">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="VisualFeedbackIndicator"
                                                             Storyboard.TargetProperty="Opacity"
                                                             Duration="0:0:0.5"
                                                             To="0" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Pressed"
                                                      To="Normal">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="VisualFeedbackIndicator"
                                                             Storyboard.TargetProperty="Opacity"
                                                             Duration="0:0:0.5"
                                                             To="0" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="VisualFeedbackIndicator"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0:0:0.5"
                                                         To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="VisualFeedbackIndicator"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                       Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush"
                                                                       Storyboard.TargetName="Border">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledBorderThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
                                                                       Storyboard.TargetName="Border">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="VisualFeedbackIndicator"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Width="{StaticResource EdgeMultiSelectButtonVisualWidth}"
                                Opacity="0"
                                HorizontalAlignment="Left">
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MultiSelectListViewItemStyle"
           TargetType="ListViewItem">
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                    <Border x:Name="OuterContainer"
                            RenderTransformOrigin="0.5,0.5">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="TiltContainer" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckboxPressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="CheckboxTiltContainer" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle"
                                                                       Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource CheckBoxPressedBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph"
                                                                       Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource CheckBoxPressedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="{ThemeResource ListViewItemDisabledThemeOpacity}" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRectangle"
                                                                       Storyboard.TargetProperty="Stroke"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource CheckBoxDisabledBorderThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph"
                                                                       Storyboard.TargetProperty="Fill"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource CheckBoxDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder"
                                                                       Storyboard.TargetProperty="BorderBrush"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedEarmark"
                                                                       Storyboard.TargetProperty="Fill"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedGlyph"
                                                                       Storyboard.TargetProperty="Fill"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Pressed"
                                                      To="Normal">
                                        <Storyboard>
                                            <PointerUpThemeAnimation Storyboard.TargetName="TiltContainer" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CheckGlyph"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                        <DoubleAnimation Storyboard.TargetName="SelectedCheckMark"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedUnfocused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CheckGlyph"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                        <DoubleAnimation Storyboard.TargetName="SelectedCheckMark"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DataVirtualizationStates">
                                <VisualState x:Name="DataAvailable" />
                                <VisualState x:Name="DataPlaceholder">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderRect"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MultiSelectStates">
                                <VisualState x:Name="NoMultiSelect">
                                    <Storyboard>
                                        <DoubleAnimation To="0"
                                                         Duration="0"
                                                         Storyboard.TargetName="CheckboxContainer"
                                                         Storyboard.TargetProperty="Opacity" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EdgeButton"
                                                                       Storyboard.TargetProperty="IsHitTestVisible">
                                            <ObjectAnimationUsingKeyFrames.KeyFrames>
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="True" />
                                            </ObjectAnimationUsingKeyFrames.KeyFrames>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation To="-47"
                                                         Duration="0"
                                                         Storyboard.TargetName="CheckboxContainerTranslateTransform"
                                                         Storyboard.TargetProperty="X">
                                            <DoubleAnimation.EasingFunction>
                                                <ExponentialEase EasingMode="EaseOut"
                                                                 Exponent="5" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation To="0"
                                                         Duration="0:0:0.25"
                                                         Storyboard.TargetName="ContentBorderTranslateTransform"
                                                         Storyboard.TargetProperty="X">
                                            <DoubleAnimation.EasingFunction>
                                                <ExponentialEase EasingMode="EaseOut"
                                                                 Exponent="5" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ListMultiSelect">
                                    <Storyboard>
                                        <DoubleAnimation To="1"
                                                         Duration="0"
                                                         Storyboard.TargetName="CheckboxContainer"
                                                         Storyboard.TargetProperty="Opacity" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EdgeButton"
                                                                       Storyboard.TargetProperty="IsHitTestVisible">
                                            <ObjectAnimationUsingKeyFrames.KeyFrames>
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="False" />
                                            </ObjectAnimationUsingKeyFrames.KeyFrames>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation To="0"
                                                         Duration="0:0:0.2"
                                                         Storyboard.TargetName="CheckboxContainerTranslateTransform"
                                                         Storyboard.TargetProperty="X">
                                            <DoubleAnimation.EasingFunction>
                                                <ExponentialEase EasingMode="EaseOut"
                                                                 Exponent="5" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                        <DoubleAnimation To="{ThemeResource ListViewItemContentTranslateX}"
                                                         Duration="0:0:0.175"
                                                         Storyboard.TargetName="ContentBorderTranslateTransform"
                                                         Storyboard.TargetProperty="X">
                                            <DoubleAnimation.EasingFunction>
                                                <ExponentialEase EasingMode="EaseOut"
                                                                 Exponent="5" />
                                            </DoubleAnimation.EasingFunction>
                                        </DoubleAnimation>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="GridMultiSelect">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="SelectedBorder"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Duration="0"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ReorderModeStates">
                                <VisualState x:Name="ReorderEnabled">
                                    <Storyboard>
                                        <DropTargetItemThemeAnimation Storyboard.TargetName="OuterContainer" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Reorderable">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentScaleTransform"
                                                                       Storyboard.TargetProperty="ScaleX">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.075"
                                                                  Value="1.05" />
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                                                  Value="1.0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentScaleTransform"
                                                                       Storyboard.TargetProperty="ScaleY">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.075"
                                                                  Value="1.05" />
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                                                  Value="1.0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReorderDisabled" />
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="ReorderEnabled"
                                                      To="ReorderDisabled"
                                                      GeneratedDuration="00:00:00.2" />
                                </VisualStateGroup.Transitions>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ReorderHintStates">
                                <VisualState x:Name="NoReorderHint" />
                                <VisualState x:Name="BottomReorderHint">
                                    <Storyboard>
                                        <DragOverThemeAnimation Storyboard.TargetName="ReorderHintContent"
                                                                ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
                                                                Direction="Bottom" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="RightReorderHint">
                                    <Storyboard>
                                        <DragOverThemeAnimation Storyboard.TargetName="ReorderHintContent"
                                                                ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
                                                                Direction="Right" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TopReorderHint">
                                    <Storyboard>
                                        <DragOverThemeAnimation Storyboard.TargetName="ReorderHintContent"
                                                                ToOffset="0"
                                                                Direction="Top" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="LeftReorderHint">
                                    <Storyboard>
                                        <DragOverThemeAnimation Storyboard.TargetName="ReorderHintContent"
                                                                ToOffset="0"
                                                                Direction="Left" />
                                    </Storyboard>
                                </VisualState>
                                <VisualStateGroup.Transitions>
                                    <VisualTransition To="NoReorderHint"
                                                      GeneratedDuration="0:0:0.2" />
                                </VisualStateGroup.Transitions>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border.RenderTransform>
                            <ScaleTransform x:Name="ContentScaleTransform" />
                        </Border.RenderTransform>
                        <Grid x:Name="ReorderHintContent"
                              Background="Transparent">
                            <Border x:Name="CheckboxTiltContainer"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top"
                                    Margin="{ThemeResource ListViewItemMultiselectCheckBoxMargin}">
                                <Border x:Name="CheckboxOuterContainer"
                                        Padding="{ThemeResource ListViewItemCheckBoxPadding}">
                                    <Border.Clip>
                                        <RectangleGeometry Rect="0,0,44.5,44.5" />
                                    </Border.Clip>
                                    <Grid x:Name="CheckboxContainer"
                                          Opacity="0">
                                        <Grid.RenderTransform>
                                            <TranslateTransform x:Name="CheckboxContainerTranslateTransform"
                                                                X="{ThemeResource ListViewItemContentOffsetX}" />
                                        </Grid.RenderTransform>
                                        <Rectangle x:Name="NormalRectangle"
                                                   Fill="{ThemeResource CheckBoxBackgroundThemeBrush}"
                                                   Stroke="{ThemeResource CheckBoxBorderThemeBrush}"
                                                   StrokeThickness="{ThemeResource CheckBoxBorderThemeThickness}"
                                                   Height="25.5"
                                                   Width="25.5" />
                                        <Path x:Name="CheckGlyph"
                                              IsHitTestVisible="False"
                                              Width="18.5"
                                              Height="17"
                                              Stretch="Fill"
                                              Opacity="0"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Fill="{ThemeResource CheckBoxForegroundThemeBrush}"
                                              Data="M0,123 L39,93 L124,164 L256,18 L295,49 L124,240 z"
                                              StrokeLineJoin="Round"
                                              StrokeThickness="2.5"
                                              FlowDirection="LeftToRight" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border x:Name="ContentContainer">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Border x:Name="TiltContainer"
                                            Grid.Column="1">
                                        <Border x:Name="ContentBorder"
                                                Background="{TemplateBinding Background}"
                                                BorderBrush="{TemplateBinding BorderBrush}"
                                                BorderThickness="{TemplateBinding BorderThickness}">
                                            <Border.RenderTransform>
                                                <TranslateTransform x:Name="ContentBorderTranslateTransform" />
                                            </Border.RenderTransform>
                                            <Grid>
                                                <ContentPresenter x:Name="contentPresenter"
                                                                  ContentTransitions="{TemplateBinding ContentTransitions}"
                                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                  Content="{TemplateBinding Content}"
                                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                                  Margin="{TemplateBinding Padding}" />
                                                <!-- The 'Xg' text simulates the amount of space one line of text will occupy.
                                                In the DataPlaceholder state, the Content is not loaded yet so we
                                                approximate the size of the item using placeholder text. -->
                                                <TextBlock x:Name="PlaceholderTextBlock"
                                                           Opacity="0"
                                                           Text="Xg"
                                                           Foreground="{x:Null}"
                                                           Margin="{TemplateBinding Padding}"
                                                           IsHitTestVisible="False"
                                                           AutomationProperties.AccessibilityView="Raw" />
                                                <Rectangle x:Name="PlaceholderRect"
                                                           Visibility="Collapsed"
                                                           Fill="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}"
                                                           IsHitTestVisible="False" />
                                            </Grid>
                                        </Border>
                                    </Border>
                                    <common:EdgeSelectButton x:Name="EdgeButton" />
                                </Grid>
                            </Border>
                            <Border x:Name="SelectedBorder"
                                    IsHitTestVisible="False"
                                    Opacity="0"
                                    BorderBrush="{ThemeResource ListViewItemSelectedBackgroundThemeBrush}"
                                    BorderThickness="{ThemeResource GridViewItemMultiselectBorderThickness}">
                                <Grid x:Name="SelectedCheckMark"
                                      Opacity="0"
                                      Height="34"
                                      Width="34"
                                      HorizontalAlignment="Right"
                                      VerticalAlignment="Top">
                                    <Path x:Name="SelectedEarmark"
                                          Data="M0,0 L40,0 L40,40 z"
                                          Fill="{ThemeResource ListViewItemSelectedBackgroundThemeBrush}"
                                          Stretch="Fill" />
                                    <Path x:Name="SelectedGlyph"
                                          Data="M0,123 L39,93 L124,164 L256,18 L295,49 L124,240 z"
                                          Fill="{ThemeResource ListViewItemCheckThemeBrush}"
                                          Height="14.5"
                                          Stretch="Fill"
                                          Width="17"
                                          HorizontalAlignment="Right"
                                          Margin="0,1,1,0"
                                          VerticalAlignment="Top"
                                          FlowDirection="LeftToRight" />
                                </Grid>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="local:MultiSelectListView">
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="TabNavigation"
                Value="Once" />
        <Setter Property="IsSwipeEnabled"
                Value="True" />
        <Setter Property="HorizontalContentAlignment"
                Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollMode"
                Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollMode"
                Value="Auto" />
        <Setter Property="ScrollViewer.ZoomMode"
                Value="Disabled" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled"
                Value="False" />
        <Setter Property="ScrollViewer.BringIntoViewOnFocusChange"
                Value="True" />
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource MultiSelectListViewItemStyle}" />
        <Setter Property="ItemContainerTransitions">
            <Setter.Value>
                <TransitionCollection>
                    <AddDeleteThemeTransition />
                    <ReorderThemeTransition />
                </TransitionCollection>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <ItemsStackPanel Orientation="Vertical" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MultiSelectListView">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer x:Name="ScrollViewer"
                                      TabNavigation="{TemplateBinding TabNavigation}"
                                      HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                      IsHorizontalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsHorizontalScrollChainingEnabled}"
                                      VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                      IsVerticalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsVerticalScrollChainingEnabled}"
                                      IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                      IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                      ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}"
                                      IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                      BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                      AutomationProperties.AccessibilityView="Raw">
                            <ItemsPresenter Header="{TemplateBinding Header}"
                                            HeaderTemplate="{TemplateBinding HeaderTemplate}"
                                            HeaderTransitions="{TemplateBinding HeaderTransitions}"
                                            Footer="{TemplateBinding Footer}"
                                            FooterTemplate="{TemplateBinding FooterTemplate}"
                                            FooterTransitions="{TemplateBinding FooterTransitions}"
                                            Padding="{TemplateBinding Padding}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--LinearDial-->
    <Style x:Name="LinearDialButtonStyle"
           TargetType="RepeatButton">
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{ThemeResource PhoneForegroundBrush}" />
        <Setter Property="BorderThickness"
                Value="0" />
        <Setter Property="FontFamily"
                Value="{ThemeResource PhoneFontFamilyNormal}" />
        <Setter Property="FontWeight"
                Value="{ThemeResource PhoneButtonFontWeight}" />
        <Setter Property="FontSize"
                Value="{ThemeResource TextStyleLargeFontSize}" />
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="MinHeight"
                Value="{ThemeResource PhoneButtonMinHeight}" />
        <Setter Property="MinWidth"
                Value="{ThemeResource PhoneButtonMinHeight}" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid x:Name="Grid"
                          Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="Grid" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                                                                       Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                       Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledBorderThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                       Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="{ThemeResource ButtonDisabledBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Pressed"
                                                      To="PointerOver">
                                        <Storyboard>
                                            <PointerUpThemeAnimation Storyboard.TargetName="Grid" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="PointerOver"
                                                      To="Normal">
                                        <Storyboard>
                                            <PointerUpThemeAnimation Storyboard.TargetName="Grid" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Pressed"
                                                      To="Normal">
                                        <Storyboard>
                                            <PointerUpThemeAnimation Storyboard.TargetName="Grid" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Margin="{ThemeResource PhoneTouchTargetOverhang}">
                            <ContentPresenter x:Name="ContentPresenter"
                                              Foreground="{TemplateBinding Foreground}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              Margin="{TemplateBinding Padding}"
                                              Content="{TemplateBinding Content}"
                                              ContentTemplate="{TemplateBinding ContentTemplate}"
                                              AutomationProperties.AccessibilityView="Raw" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="local:LinearDial">
        <Setter Property="Background"
                Value="{ThemeResource PhoneChromeBrush}" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="FontFamily"
                Value="{ThemeResource PhoneFontFamilySemiLight}" />
        <Setter Property="Minimum"
                Value="0" />
        <Setter Property="Maximum"
                Value="100" />
        <Setter Property="SmallChange"
                Value="1" />
        <Setter Property="LargeChange"
                Value="5" />
        <Setter Property="MarkerInterval"
                Value="10" />
        <Setter Property="ManipulationMode"
                Value="TranslateInertia,TranslateRailsX,TranslateX,System" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LinearDial">
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="19" />
                        </Grid.RowDefinitions>
                        <ContentPresenter x:Name="HeaderContentPresenter"
                                          Grid.ColumnSpan="3"
                                          HorizontalAlignment="Left"
                                          Style="{StaticResource HeaderContentPresenterStyle}"
                                          FlowDirection="{TemplateBinding FlowDirection}"
                                          Visibility="Collapsed"
                                          Content="{TemplateBinding Header}"
                                          ContentTemplate="{TemplateBinding HeaderTemplate}"
                                          Margin="19,0,0,-4.5" />
                        <ScrollViewer x:Name="part_DialScrollViewer"
                                      Grid.Column="1"
                                      Grid.Row="1"
                                      VerticalScrollMode="Disabled"
                                      HorizontalScrollMode="Enabled"
                                      HorizontalScrollBarVisibility="Hidden"
                                      IsHitTestVisible="False">
                            <ItemsControl x:Name="part_DialMarkers">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <ItemsStackPanel Orientation="Horizontal"
                                                         CacheLength="5" />
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}"
                                                   Foreground="{ThemeResource PhoneMidBrush}"
                                                   FontFamily="{ThemeResource PhoneFontFamilyNormal}"
                                                   FontSize="14"
                                                   TextAlignment="Center"
                                                   VerticalAlignment="Center" />
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </ScrollViewer>
                        <Grid Grid.Column="1"
                              Grid.Row="1"
                              Height="55"
                              Width="55"
                              Margin="-2.5">
                            <Ellipse Fill="{TemplateBinding Background}"
                                     Stroke="{TemplateBinding BorderBrush}"
                                     StrokeThickness="2.5" />
                            <Viewbox StretchDirection="DownOnly">
                                <ContentPresenter Content="{TemplateBinding DisplayValue}"
                                                  FontSize="{ThemeResource TextStyleExtraLargeFontSize}"
                                                  TextLineBounds="Tight"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Margin="2.5" />
                            </Viewbox>
                        </Grid>
                        <RepeatButton x:Name="part_DecrementButton"
                                      Grid.Row="1"
                                      Style="{ThemeResource LinearDialButtonStyle}"
                                      HorizontalContentAlignment="Left"
                                      Padding="19,0,0,0">
                            <PathIcon Height="20"
                                      Width="20"
                                      Data="F1 M 8.61111,10L 10.8333,12.2222L 18.8889,20L 11.6667,20L 1.11111,10L 11.6667,5.72205e-006L 18.8889,5.72205e-006L 10.8333,7.77778L 8.61111,10 Z" />
                        </RepeatButton>
                        <RepeatButton x:Name="part_IncrementButton"
                                      Grid.Column="2"
                                      Grid.Row="1"
                                      Style="{ThemeResource LinearDialButtonStyle}"
                                      HorizontalContentAlignment="Right"
                                      Padding="0,0,19,0">
                            <PathIcon Height="20"
                                      Width="20"
                                      Data="F1 M 11.3889,10L 9.16667,7.77778L 1.11112,0L 8.33333,1.90735e-006L 18.8889,10L 8.33333,20L 1.11112,20L 9.16667,12.2222L 11.3889,10 " />
                        </RepeatButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
